<template>
	<view v-if="config">
		<view class="wximg">
			<image @tap="clickimg" :src="tool.img(config.dimage)" mode="widthFix"></image>
		</view>
		<view class="wxtext">
			扫描二维码，添加专属客服
		</view>
	</view>
</template>

<script>
	import tool from '../../utils/tool'
	export default {
		data() {
			return {
				tool:tool,
				config: ''
			}
		},
		onLoad() {
			this.Getconfig()
		},
		methods: {
			clickimg(){
				this.tool.ClickImg(this.tool.img(this.config.dimage))
			},
			Getconfig() {
				uni.showLoading({
					title:'正在加载'
				})
				this.$http.Post('zter/shopInfo', {}, (result) => {
					this.config = result.data
					uni.hideLoading()
				})
			},
		}
	}
</script>

<style>
	.wximg {
		width: 100%;
		display: flex;
		justify-content: center;
		align-items: center;
		margin-top: 200rpx;
	}

	.wxtext {
		text-align: center;
		color: #999;
		font-size: 28rpx;
		margin-top: 50rpx;
	}
</style>